package com.lingjtx.common.thread.mq;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "spring.rabbit.stream")
public class RabbitStreamConsumerProperties {

    private String host = "localhost";
    private Integer port = 5552;
    private String username = "guest";
    private String password = "guest";

    /**
     * 最大重试次数
     */
    private int maxRetries = 3;

    /**
     * 死信流前缀
     */
    private String deadLetterPrefix = "dead-letter-";

    /**
     * 每秒最大处理速率
     */
    private int maxRatePerSecond = 100;

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getMaxRetries() {
        return maxRetries;
    }

    public void setMaxRetries(int maxRetries) {
        this.maxRetries = maxRetries;
    }

    public String getDeadLetterPrefix() {
        return deadLetterPrefix;
    }

    public void setDeadLetterPrefix(String deadLetterPrefix) {
        this.deadLetterPrefix = deadLetterPrefix;
    }

    public int getMaxRatePerSecond() {
        return maxRatePerSecond;
    }

    public void setMaxRatePerSecond(int maxRatePerSecond) {
        this.maxRatePerSecond = maxRatePerSecond;
    }
}
